home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OExamples / DAEntry.a next >
Encoding:
Text File  |  1993-05-07  |  2.1 KB  |  66 lines  |  [TEXT/MPS ]

  1. ***************************************************************************
  2. ****    
  3. ****    DESK ACCESSORY and DEVICE DRIVER Entry Code/Data
  4. ****    
  5. ***************************************************************************
  6.  
  7.         STRING    PASCAL
  8.  
  9.         INCLUDE 'ToolEqu.a'
  10.         INCLUDE 'SysEqu.a'
  11.         
  12.         CASE OBJ
  13. **************************** DESK ACCESSORY ENTRY **************************
  14.         IMPORT %DRVRMain
  15.  
  16. DAEntry Proc Export                                    ; See Device Manager IM:2
  17. ;
  18. ; First we need to set the drvrFlags (IM II-188), choose from
  19. ;
  20. ;    dReadEnable        enable driver for read operations             (drivers only)
  21. ;    dWritEnable        enable driver for writing                     (drivers only)
  22. ;    dCtlEnable        enable driver/da for control operations        
  23. ;    dStatEnable        enable driver/da for status operations        (drivers only)
  24. ;    dNeedGoodBye    driver/da needs a "goodbye kiss"
  25. ;    dNeedTime        driver/da needs "main thread" time
  26. ;    dNeedLock        driver will be accessed at interrupt level    (drivers only)
  27. ;
  28.     DC.B        (1<<dCtlEnable) + (1<<dNeedTime)    ; periodic, control flags set
  29.     DC.B        0                                    ; Lower byte is unused
  30. ;
  31. ; Next is the the drvrDelay (IM II-188), set only if dNeedTime flag set above
  32. ;
  33.     DC.W        5*60                                ; 5 sec periodic update
  34. ;
  35. ; Next is the the drvrEMask (IM I-444), which events DA can respond to...
  36. ; Must be NIL for drivers, for DA's choose from
  37. ;    mButDwnEvt        mouse button down is event 1
  38. ;    keyDwnEvt        key down is event 3
  39. ;    keyUpEvt        key up is event 4
  40. ;    autoKeyEvt        auto-repeated key is event 5
  41. ;    updatEvt        update event
  42. ;    activateEvt        activate/deactive event
  43. ;
  44.     DC.W        (1<<updatEvt)                        ; Handle activate, update events
  45. ;
  46. ; Next is the the drvrMenu (IM I-444), Menu ID of DA's menu, or NIL
  47. ;
  48.     DC.W        0                                    ; No associated menu
  49. ;
  50. ; Next are the offsets to the main routines of the driver/DA
  51. ;
  52.     DC.W        %DRVRMain - DAEntry                    ; Open routine
  53.     DC.W        %DRVRMain - DAEntry +4                ; Prime - unused for DA's
  54.     DC.W        %DRVRMain - DAEntry +8                ; Control
  55.     DC.W        %DRVRMain - DAEntry +12                ; Status - unused for DA's
  56.     DC.W        %DRVRMain - DAEntry +16             ; Close
  57.  
  58. ;
  59. ; Next are the offsets to the main routines of the driver/DA
  60. ;
  61. DAName
  62.     DC.B        'Memory'                             ; DA/DRVR Name
  63.     ORG            DAName+32                            ; Pad string out to 32 bytes
  64.  
  65.     END
  66.